﻿@model CID.Web.Models.Operations.ServerViewModel

<div id="Tabs">
    <ul>
        <li><a href="#General">General</a></li>
        <li><a href="#Assignments">Assignments</a></li>
    </ul>
    <div id="General">
        <div class="display-label">@Html.LabelFor(m => m.Name)</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Name)
        </div>

        <div class="display-label">@Html.LabelFor(m => m.Address)</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Address)
        </div>

        <div class="display-label">@Html.LabelFor(m => m.Location)</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Location)
        </div>

        <div class="display-label">@Html.LabelFor(m => m.Enabled)</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Enabled)
        </div>
    </div>

    <div id="Assignments">
        <div class="display-field">
            <table>
                <thead>
                    <tr>
                        <th>Server</th>
                        <th>Role</th>
                    </tr>
                </thead>
                <tbody>
                @foreach (var item in Model.Assignments)
                {
                    <tr>
                        <td>@Html.DisplayFor(m => item.Server)</td>
                        <td>@Html.DisplayFor(m => item.ServerRole)</td>
                    </tr>
                }
                </tbody>
            </table>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function () {
        $("#Tabs").tabs();
    });
</script>